//
//  SuccessfulViewController.m
//  AppointmentForCar
//
//  Created by Herron on 2016/11/15.
//  Copyright © 2016年 Herron. All rights reserved.
//

#import "SuccessfulViewController.h"
#import "CallCarModel.h"
@interface SuccessfulViewController ()

@property (weak, nonatomic) IBOutlet UIButton *finishedBtn;
@property (weak, nonatomic) IBOutlet UILabel *driverNamaLabel;
@property (weak, nonatomic) IBOutlet UILabel *driverPhoneLabel;
@property (weak, nonatomic) IBOutlet UILabel *carNumLabel;
@property (weak, nonatomic) IBOutlet UILabel *carBrandLabel;

@end

@implementation SuccessfulViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.finishedBtn.layer.cornerRadius = 22;
    self.finishedBtn.layer.masksToBounds = YES;
    self.finishedBtn.layer.borderWidth = 1;
    self.finishedBtn.layer.borderColor = kColorFontGray.CGColor;
    [self.finishedBtn addTarget:self action:@selector(clickFinish) forControlEvents:UIControlEventTouchUpInside];
}
- (void)viewWillLayoutSubviews
{
    [super viewWillLayoutSubviews];
    _driverNamaLabel.text = _model.driverNickName;
    _driverPhoneLabel.text = _model.driverPhoneNumber;
    _carNumLabel.text = _model.licensePlate;
    _carBrandLabel.text = _model.carBrand;
}
- (void)clickFinish
{
    if([_delegate respondsToSelector:@selector(successfulClick:)])
    {
        [_delegate successfulClick:self];
    }
}


@end
